import request from '@/src/basic/utils/request.js'
function handleParams(param) {
  let paramsUrl = ''
  for (const item in param) {
    let val = param[item]
    let str = `${item}=${val}&`
    paramsUrl += str
  }
  paramsUrl = paramsUrl.slice(0, paramsUrl.length - 1)
  return paramsUrl
}
export const getSatues = async params => {
  const { data } = await request.post('/merchant/app/store/getShopToExamine', params)
  return data
}
// export const confirm = async params => {
//   const { data } = await request.get('/merchant/app/multiIndustryReceive/confirm', params)
//   return data
// }
export const confirm = async params => {
  const { data } = await request.get(`/merchant/app/multiIndustryReceive/confirm?${handleParams(params)}`)
  return data
}

// /app/store-function/getStoreFunctionDetail店铺信息保存经营类型id
export const getStoreFunctionDetail = async params => {
  const { data } = await request.post(`/merchant/app/store-function/getStoreFunctionDetail?${handleParams(params)}`)
  return data
}
// /app/store-function/saveUpdateStoreFunction店铺信息保存经营类型id
export const saveUpdateStoreFunction = async params => {
  const { data } = await request.post('/merchant/app/store-function/saveUpdateStoreFunction', params)
  return data
}
// /app/multiIndustryReceive/findConponJournalList商户查询校验记录
export const findConponJournalList = async params => {
  const { data } = await request.get(`/merchant/app/multiIndustryReceive/findConponJournalList?${handleParams(params)}`)
  return data
}
// /app/store/getStoreDate获取门店数据
export const getStoreDate = async params => {
  const { data } = await request.get(`/merchant/app/store/getStoreDate?${handleParams(params)}`)
  return data
}